package com.irdstudio.apicenter.console.service.template;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.irdstudio.apicenter.frame.maker.dm.STemplateParam;
import com.irdstudio.apicenter.frame.maker.dm.STemplateParamDao;

@Service(value = "sTemplateService")
public class STemplateParamService {
	@Autowired
	private STemplateParamDao sTemplateParamDao;

	/**
	 * 获取模块信息
	 * 
	 * @param id
	 * @param name
	 * @param pageNowe
	 * @param pageSiz
	 * @return
	 * @throws SQLException
	 * @throws ClassNotFoundException
	 */
	public int insertBean(STemplateParam sTemplateParam) throws SQLException,
			ClassNotFoundException {

		return sTemplateParamDao.insert(sTemplateParam);

	}

	public int update(STemplateParam sTemplateParam) throws SQLException,
			ClassNotFoundException {

		return sTemplateParamDao.update(sTemplateParam);

	}

	public STemplateParam queryBykeys(String templateId,
			String templateParamCode) throws SQLException {
		return sTemplateParamDao.queryWithKeys(templateId, templateParamCode);

	}
	
	public List<STemplateParam> queryWithCond(String szCondition,String szOrderBy) throws SQLException{
		return sTemplateParamDao.queryWithCond(szCondition, szOrderBy);
	}

}
